  {extend name="Public:base" /}
                       {block name="seo"}
         <title>发布悬赏|{$Think.CONFIG.WEB_SITE_TITLE} - Powered by EasySNS!</title>
  
  
  <meta name="keywords" content="{$Think.CONFIG.WEB_SITE_KEYWORD}">
  <meta name="description" content="{$Think.CONFIG.WEB_SITE_DESCRIPTION}">
      {/block}
  {block name="css"}

  {/block}
  {block name="extenddiv"}

  {/block}
    {block name="extenddivend"}

  {/block}
  {block name="body"}
  <form class="form-horizontal" data-url="{:url('doc/docxs')}" id="docxsform">
<div id="upload-init-container " class="container upload-widget" style="display: block;">

<div class="task-fq-tips">
<ul class="clearfix">
<li><span class="icon-task icon-task-0"></span>找不到想要的文档？</li>
<li class="current"><span class="icon-task icon-task-1"></span>发布悬赏任务</li>
<li><span class="icon-task icon-task-2"></span>收到满意文档</li>
</ul>
</div>

<div class="es-panel  " style="margin-bottom:60px;border: 1px solid #d9d9d9;border-top:none;">

<div class="uploadinfo">

<div class="uploadinfo-content-end ">
<div class="form-group col-sm-8">
    <label for="inputEmail3" class="col-sm-3  control-label"><span class="text-danger">*</span>标题:</label>
   <div class="col-sm-6">
      <input type="text" class="form-control" id="title" name="title" placeholder="填写所需文档标题">
  <span id="helpBlock" class="help-block ">填写所需文档标题</span>
  </div>
  </div>
<div class="form-group col-sm-8">
    <label for="inputEmail3" class="col-sm-3  control-label"><span class="text-danger">*</span>分类:</label>
   <div class="row">
      <div class="col-sm-4" style="padding-right:0px;" >
       <select class="form-control "  id="groupcateid" name="gid" size="10" style="overflow-y:auto" >
       {volist name="groupcatelist" id="vo"}
       <option value="{$vo.id}">{$vo.name}</option>
       {/volist}
 
</select>
  </div>
   <div class="col-sm-4" style="">
<select class="form-control" name="tid" id="tid"   size="10"  style="overflow-y:auto" >
 
 
    
</select>
  </div>
   
   </div>
  </div>
<div class="form-group  col-sm-8">
    <label for="inputPassword3" class="col-sm-3 control-label">悬赏期限:</label>
     <div class="col-sm-6">
    <select class="form-control" name="days">
  <option value="3">3天</option>
  <option value="5">5天</option>
  <option value="7">7天</option>
 <option value="14">14天</option>
  <option value="30">30天</option>

</select>
    </div>
  </div>
 <div class="form-group  col-sm-8">
    <label for="inputPassword3" class="col-sm-3 control-label">赏金:</label>
     <div class="col-sm-6">
    <select class="form-control" name="score">
  <option value="4">4{$pointname}</option>
  <option value="8">8{$pointname}</option>
 <option value="12">12{$pointname}</option>
  <option value="16">16{$pointname}</option>
  <option value="20">20{$pointname}</option>
  <option value="24">24{$pointname}</option>
  <option value="40">40{$pointname}</option>
  <option value="80">80{$pointname}</option>
  <option value="100">100{$pointname}</option>
</select>
    </div>
  </div>


  <div class="clearfix"></div>

    
  
    <div class="form-group  col-sm-8">
    <label for="inputPassword3" class="col-sm-3 control-label">具体要求:</label>
    <div class="col-sm-7">
      <textarea rows="4"  class="form-control" name="description" placeholder="写的越简洁易懂，越能更快的收到满意的文档。如字数：2000字。格式：word。内容：最好是论文格式..."></textarea>
    </div>
  </div>

    <div class="form-group  col-sm-8">
    <label for="inputPassword3" class="col-sm-3 control-label"></label>
    <div class="col-sm-7">
      <button type="button" class="btn btn-success uploadinfoajax"><i class="iconfont icon-duigou"></i> 发布悬赏</button>
    </div>
  </div>



</div>

  
  
 

</div>

</div>

</div>
</form>
  {/block}
    {block name="script"}
  <script>
  $(function(){
	  $('#groupcateid').change(function(){
		  
		  $.post("{:url('Doc/getDoccatedata')}",{id:$(this).val()},function(data){
			  $('#tid').html('');
			  
			  for(var i=0;i<data.length;i++){
				  
				  $('#tid').append('<option value="'+data[i]['id']+'">'+data[i]['name']+'</option>');
				  
			  }
			  
			 
			  
		  });
		  
	  });
	  
	  $('.uploadinfoajax').click(function(){
		  
		  loading = layer.load(2, {
		      shade: [0.2,'#000']
		    });
		
		  $.post($('form#docxsform').data('url'),$('form#docxsform').serialize(),function(data){
	    	
	      if(data.code == 1){
	        layer.close(loading);
	        layer.msg(data.msg, {icon: 1, time: 1000}, function(){
	          location.href="{:url('Doc/docxscomplete')}";
	        });
	      }else{
	        layer.close(loading);
	        layer.msg(data.msg, {icon: 2, anim: 6, time: 1000});
	        
	       
	        
	      }
	    });
	    return false;
	    
	  });
  });
  </script>
    {/block}